#include "common.h"
#include "net/httpc.h"
#include "except.h"

int
main(int argc, char **argv)
{
    using namespace std;
    using namespace hl7;

    string text;

    try
    {
        httpc client(argv[1]);
        text = client.get(argv[2], atoi(argv[3]));
        cout << text << endl;
    }
    catch(Exception &e)
    {
        cout << e.what() << endl;
        return EXIT_FAILURE;
    }

    return EXIT_SUCCESS;
}
